<?php
/**
 * Class descript.
 * User: chan
 * Date: 2017/10/26 15:29
 */

namespace app\api\controller;

class Personal extends Base
{
	//检查权限作用域
    protected $beforeActionList  = [
        'checkPrimaryScope' => [
            'except' => 'member_info'//except
        ],
    ];

    //个人中心
    public function personal_center()
    {
        $personal_center =  (new \app\api\logic\Personal())->personal_center();
        return $this->ajaxReturn($personal_center);
    }


    /*
    *获取赞的列表
     */
    public function praise_list()
    {
		$praise_list =  (new \app\api\logic\Personal())->praise_list();
		return $this->ajaxReturn($praise_list);
    }


    /*
    *获取关注的列表
     */
    public function attention_list()
    {
    	$attention_list =  (new \app\api\logic\Personal())->attention_list();
		return $this->ajaxReturn($attention_list);
    }

    /*
    粉丝的列表
     */
    public function fans_list()
    {
    	$fans_list =  (new \app\api\logic\Personal())->fans_list();
		return $this->ajaxReturn($fans_list);
    }

    /*
    观看用户详情
     */
    public function member_info()
    {
        $member_info =  (new \app\api\logic\Personal())->member_info();
        return $this->ajaxReturn($member_info);
    }

    /*
    动态列表
     */
    public function dynamic()
    {
        $dynamic =  (new \app\api\logic\Personal())->dynamic();
        return $this->ajaxReturn($dynamic);
    }

    /*
    动态详情
     */
    public function dynamic_info()
    {
        $dynamic_info =  (new \app\api\logic\Personal())->dynamic_info();
        return $this->ajaxReturn($dynamic_info);
    }

    /*
    发送私信
     */
    public function send_letter()
    {
        $send_letter =  (new \app\api\logic\Personal())->send_letter();
        return $this->ajaxReturn($send_letter);
    }

    /*
    私信列表
     */
    public function letter_list()
    {
        $letter_list =  (new \app\api\logic\Personal())->letter_list();
        return $this->ajaxReturn($letter_list);
    }

    /*
    私信详情
     */
    public function letter_info()
    {
        $letter_info =  (new \app\api\logic\Personal())->letter_info();
        return $this->ajaxReturn($letter_info);
    }

    /*
    系统消息
     */
    public function system_letter()
    {
    	$system_letter =  (new \app\api\logic\Personal())->system_letter();
		return $this->ajaxReturn($system_letter);
    }

    /*
    系统详情
     */
    public function system_info()
    {
    	$system_info =  (new \app\api\logic\Personal())->system_info();
		return $this->ajaxReturn($system_info);
    }

    /*
    我的优惠卷
     */
   	public function coupon_list()
   	{
   		$coupon_list =  (new \app\api\logic\Personal())->coupon_list();
		return $this->ajaxReturn($coupon_list);
   	}

    /*
    系统生成的优惠卷
     */
    public function system_coupon()
    {
        $system_coupon =  (new \app\api\logic\Personal())->system_coupon();
        return $this->ajaxReturn($system_coupon);
    }

   	/*
   	领取优惠卷
   	 */
   	public function get_coupon()
   	{
   		$get_coupon =  (new \app\api\logic\Personal())->get_coupon();
		return $this->ajaxReturn($get_coupon);
   	}

    /*
    意见反馈
     */
    public function suggestion()
    {
        $suggestion =  (new \app\api\logic\Personal())->suggestion();
        return $this->ajaxReturn($suggestion);  
    }

    /*
    修改资料
    */
    public function changeInformation()
    {
        $changeInformation =  (new \app\api\logic\Personal())->changeInformation();
        return $this->ajaxReturn($changeInformation);
    }

    /*
    资料详情
    */
    public function userInfomation()
    {
        $userInfomation =  (new \app\api\logic\Personal())->userInfomation();
        return $this->ajaxReturn($userInfomation);
    }

    //绑定
    public function bind(){
        return $this->ajaxReturn(
            (new \app\api\logic\Personal())->bind()
        );
    }

    //一键保存个人资料
    public function one_click_save()
    {
        return $this->ajaxReturn(
            (new \app\api\logic\Personal())->one_click_save()
        );
    }
}